package cn.edu.cxcyzx.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class CheckProject implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6691617336193655574L;
	
	private int id;
	private int projectId;
	private Timestamp submit_time;
	private Timestamp checkTime;
	private String checkAddress;
	private String check_claim;//验收要求
	private int applyStatus;//0:已提交申请，1：同意申请，2：验收成功,3:驳回
	private String failCheckInfo;//驳回原因
	private float pro_rate;//评分
	private String pro_comment;//评语
	private int rebackRoom;//1:回收，0：暂未回收
	public CheckProject(){}
	public CheckProject(int projectId,int applyStatus){
		this.projectId=projectId;
		this.applyStatus=applyStatus;
	}
	public CheckProject(int projectId,float pro_rate,String pro_comment,int rebackRoom){
		this.projectId=projectId;
		this.pro_rate=pro_rate;
		this.pro_comment=pro_comment;
		this.rebackRoom=rebackRoom;
	}
	public CheckProject(int projectId,Timestamp checkTime,String checkAddress,String check_claim){
		this.projectId=projectId;
		this.checkTime=checkTime;
		this.checkAddress=checkAddress;
		this.check_claim=check_claim;
	}
	
	public int getRebackRoom() {
		return rebackRoom;
	}
	public void setRebackRoom(int rebackRoom) {
		this.rebackRoom = rebackRoom;
	}
	public float getPro_rate() {
		return pro_rate;
	}
	public void setPro_rate(float pro_rate) {
		this.pro_rate = pro_rate;
	}
	public String getPro_comment() {
		return pro_comment;
	}
	public void setPro_comment(String pro_comment) {
		this.pro_comment = pro_comment;
	}
	public String getFailCheckInfo() {
		return failCheckInfo;
	}
	public void setFailCheckInfo(String failCheckInfo) {
		this.failCheckInfo = failCheckInfo;
	}
	public String getCheck_claim() {
		return check_claim;
	}
	public void setCheck_claim(String check_claim) {
		this.check_claim = check_claim;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getProjectId() {
		return projectId;
	}
	public void setProjectId(int projectId) {
		this.projectId = projectId;
	}
	public String getSubmit_time() {
		if(submit_time==null){
			return "";
		}else{
			return (new SimpleDateFormat("yyyy-MM-dd").format(this.submit_time)).toString();
		}
	}
	public void setSubmit_time(Timestamp submit_time) {
		this.submit_time = submit_time;
	}
	public String getCheckTime() {
		String str=checkTime.toString();
		String date=str.substring(0,str.indexOf("."));
		System.out.println("CheckProject_timestamp:"+date);
		return date;
	}
	public void setCheckTime(Timestamp checkTime) {
		this.checkTime = checkTime;
	}
	public String getCheckAddress() {
		return checkAddress;
	}
	public void setCheckAddress(String checkAddress) {
		this.checkAddress = checkAddress;
	}
	public int getApplyStatus() {
		return applyStatus;
	}
	public void setApplyStatus(int applyStatus) {
		this.applyStatus = applyStatus;
	}
	@Override
	public String toString() {
		return "CheckProject [id=" + id + ", projectId=" + projectId
				+ ", submit_time=" + submit_time + ", checkTime=" + checkTime
				+ ", checkAddress=" + checkAddress + ", check_claim="
				+ check_claim + ", applyStatus=" + applyStatus
				+ ", failCheckInfo=" + failCheckInfo + ", pro_rate=" + pro_rate
				+ ", pro_comment=" + pro_comment + "]";
	}
	
	
	
	
}
